import http from "@/utils/request";
//定义首页数据
export const getData = ()=>{
    //返回一个promise的对象,通过then拿到结果
    return http.get('/home/getData')
}

//定义列表数据
export const getUser = (params) => {
    console.log(params,'params')
    //返回用户列表
    return http.get('/user/getUser',params)
}
//get和post的参数不一样
export const addUser = (data) => {
    return http.post('/user/add',data)
}

export const editUser = (data)=>{
    return http.post('/user/edit',data)
}
export const delUser = (data)=> {
    return http.post('/user/del',data)
}

export const getMenu = (data) => {
    return http.post('/permission/getMenu',data)

}